package com.eairlv.route.client.configuration;

import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @author eairlv
 * @description
 * @date 11:08 2019/12/9
 */
@Data
@ConfigurationProperties(RouteProperties.ROUTE_CLIENT_PREFIX)
public class RouteProperties {

    public static final String ROUTE_CLIENT_PREFIX = "route.client";

    /**
     * 是否开启路由。如果开启则路由生效，如果不开启则路由不生效
     */
    private Boolean enable = true;

    /**
     * 路由服务端名称
     */
    private String service = "FEIGN-ROUTE-SERVER";

    /**
     * 路由服务端通过路由KEY获取路由与创建路由URI
     */
    private String uri = "/route/server";

    /**
     * 路由服务端通过session获取路由的URI
     */
    private String sessionUri = "/route/server/session";

    /**
     * 路由默认类型
     */
    private Integer defaultType = 0;

    /**
     * 路由默认服务端
     */
    private String defaultSession = "b43d5faeca544ca6a726b7399b0167c7";

}
